//package com.zhu.service.base.config;
//import org.springframework.context.annotation.Configuration;
//
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//@Configuration
//public class WebMvcConfig implements WebMvcConfigurer {
////    @Override
////         public void addInterceptors(InterceptorRegistry registry) {
////                 registry.addInterceptor(null)
////                .addPathPatterns("/**") //拦截所有路径
////                .excludePathPatterns("/login") //放行login
////                .excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**");//放行swagger;
////       }
////response.addHeader(  "Access-Control-Allow-Origin"，"*");//允许所有来源访同
////response.addHeader(  "Access-Control-Allow-Method","POST,GET");//允许访问的方式
//
//
////    @Override
////    public void addCorsMappings(CorsRegistry registry) {
////        registry.addMapping("/**")
////
////                .allowedOrigins("*")
////
////                .allowCredentials(true)
////
////                .allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH")
////
////                .maxAge(3600);
//
//
//
////        registry.addMapping("/**").allowedOrigins("http://localhost:8888");
//
//
//
//}
